<ui:composition xmlns="http://www.w3.org/1999/xhtml"
			    xmlns:ui="http://java.sun.com/jsf/facelets"
			    xmlns:h="http://java.sun.com/jsf/html"
			    xmlns:f="http://java.sun.com/jsf/core"
			    xmlns:rich="http://richfaces.org/rich"
			    xmlns:a4j="http://richfaces.org/a4j"
			    template="/WEB-INF/layout/template.xhtml">
	
	<ui:define name="title">
		<h:outputText value="#{i18n['googleMaps.title']}"/>
	</ui:define>
		
	<ui:define name="contents">
		<h1>
			<h:outputText value="#{i18n['googleMaps.heading']}"/>
		</h1>
		
		<h:form id="koordinatenForm">
			<h:panelGrid columns="2">
				<h:outputLabel id="breiteLabel"
				               value="#{i18n['googleMaps.breite']}"
				               for="breite"/>
				<a4j:region>
					<h:inputText id="breite" value="#{googleMaps.lat}"
					             required="true"
					             requiredMessage="#{i18n['googleMaps.lat.required']}"/>
				</a4j:region>

				<h:outputLabel id="laengeLabel"
				               value="#{i18n['googleMaps.laenge']}"
				               for="laenge"/>
				<a4j:region>
					<h:inputText id="laenge" value="#{googleMaps.lng}"
					             required="true"
					             requiredMessage="#{i18n['googleMaps.lng.required']}"/>
				</a4j:region>
				
				<h:outputLabel id="zoomLabel"
				               value="#{i18n['googleMaps.zoom']}"
				               for="zoom"/>
				<a4j:region>
					<h:inputText id="zoom" value="#{googleMaps.zoom}"
					             required="true"
					             requiredMessage="#{i18n['googleMaps.zoom.required']}"/>
				</a4j:region>

				<a4j:commandButton id="findSubmit"
				                   value="#{i18n['googleMaps.button']}"
				                   reRender="map"/>			
			</h:panelGrid>
		</h:form>
		
		<rich:gmap id="map" gmapKey="myKey" lat="#{googleMaps.lat}" lng="#{googleMaps.lng}" zoom="#{googleMaps.zoom}"/>
	</ui:define>
</ui:composition>

